﻿Imports LecturerAppointmentSystem.UserDetails


Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Roles.IsUserInRole("Lecturer") Then
            Response.Redirect("Calendar.aspx?Date=" & Date.Today & ("&UserId=" & getUserId(User.Identity.Name)))
        ElseIf Roles.IsUserInRole("Student") Then
            Response.Redirect("Calendar.aspx?Date=" & Date.Today & ("&UserId=" & getUserId(User.Identity.Name)))
        ElseIf Roles.IsUserInRole("Administrator") Then
            Response.Redirect("AdministratorHome.aspx")
        Else
            Response.Redirect("Login.aspx")
        End If
    End Sub
End Class